Skip to content

hisilicon-opensdk: wire hi3520dv200 (replace 4 vendor blobs with source-built)#2109

Merged
widgetii merged 1 commit into
masterfrom
feat/hi3520dv200-opensdk-source-modules
May 18, 2026
Merged

hisilicon-opensdk: wire hi3520dv200 (replace 4 vendor blobs with source-built)#2109
widgetii merged 1 commit into
masterfrom
feat/hi3520dv200-opensdk-source-modules

Conversation

@widgetii
Copy link
Copy Markdown
Member

Summary

Wire hi3520dv200 into hisilicon-opensdk for the first time. The matching source mirror landed upstream in openipc/openhisilicon#163 + #164.

Replaces 4 of the modules in /lib/modules/3.0.8/hisilicon/ — the ones load_hisilicon actually `insmod`s today — with versions built from vendor V2 source:

/lib/modules/3.0.8/hisilicon/ source path in openhisilicon
mmz.ko kernel/mmz/hi3520dv200/{media-mem,mmz-userdev,kcom}.c
hiuser.ko kernel/hiuser/hi3520dv200/{hi_user.c, cache-l1.S}
gpioi2c.ko kernel/gpio_i2c/hi3520dv200/gpio_i2c.c
nvp6134_ex.ko kernel/nvp6134c/ (existing, now built per-SoC via SUPPORT_HI3520D)

The MPP video pipeline (hi3520D_base/sys/viu/vpss/vou/venc/...) stays as pre-built blobs in hisilicon-osdrv-hi3520dv200 — vendor never released V2 MPP source. Other extdrv source (tw286x, cx26828, tlv*, ssp) is built but not installed yet (load_hisilicon doesn't insmod them, so leaving disk footprint untouched).

Userspace libraries (libraries/) is a no-op for hi3520dv200 for now — the opensdk libraries/Makefile has no SUBDIRS filter for this CHIPARCH yet, so we short-circuit the BUILD_CMDS to skip it. Lifts when a userspace mirror lands.

Test plan

  • `make BOARD=hi3520dv200_lite` builds cleanly (~50s incremental after opensdk dirclean).
  • Generated `openipc.hi3520dv200-nor-lite.tgz` flashes via `sysupgrade --url=...` on the lab DVR (openipc-hi3520dv200.dlab.torturelabs.com / 10.216.128.33).
  • After reboot, the four installed modules are byte-identical to the build artifacts (built sha != vendor sha) — vendor blobs replaced.
  • `lsmod` post-load: vendor MPP blobs (hi3520D_aenc/vdec/h264e/tde/base/hifb, etc.) bind cleanly to source-built `open_mmz`; `hi3520D_vfmw/vdec/jpege/h264e` bind to source-built `open_hi_user`; `nvp6114_ex` binds to source-built `open_gpioi2c`. No symbol-resolution errors.
  • The dvr_home demo (~/hifb-demo) brings up MPP, the video pipeline, and the LVGL UI against the source-built modules without regression — same VENC mmap quirk as before, predates this PR.

Notes

  • One known follow-up: `open_nvp6134_ex.ko` loads on demand but the lab DVR has an actual NVP6114 chip wired, so load_hisilicon falls through to the vendor `nvp6114_ex.ko` blob (which itself now binds to source-built `open_gpioi2c`).
  • The opensdk `HISILICON_OPENSDK_BUILD_CMDS` override for hi3520dv200 is a stopgap; remove once the openhisilicon-side libraries/ tree gains a hi3520dv200 case.

Bump openhisilicon to 55b72ec — adds the hi3520dv200 source mirror plus
the gpio_i2c include-path fix for nvp6134c.

hi3520dv200_lite now builds open_mmz / open_hi_user / open_gpioi2c /
open_nvp6134_ex from source and installs them into
/lib/modules/3.0.8/hisilicon/ with vendor names, overriding the
matching blobs in hisilicon-osdrv-hi3520dv200. The MPP video pipeline
(hi3520D_base/sys/viu/vpss/vou/venc/...) stays as vendor blobs since
vendor never released V2 MPP source.

Smoke-tested on the lab DVR (10.216.128.33): firmware flashes via
sysupgrade, lsmod shows the vendor MPP blobs binding to our
source-built open_mmz (mmz allocator) and open_hi_user across all
relevant slots, dvr_home demo runs cleanly against the source-built
modules.

Userspace libraries side is a no-op for now — opensdk's libraries/
tree has no hi3520dv200 SUBDIRS filter yet, so we short-circuit the
BUILD_CMDS to skip it. Lifts when userspace mirror lands.

Refs OpenIPC/openhisilicon#51 (umbrella tracker).
@widgetii widgetii merged commit 7fc6cda into master May 18, 2026
96 checks passed
@widgetii widgetii deleted the feat/hi3520dv200-opensdk-source-modules branch May 18, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant